import Cookie from "js-cookie"

const Catch={
    set:(name,value,expires=7,path='/')=>{
        return Cookie.set(name,value,{expires,path});
    },
    get:(name)=>{
        return Cookie.get(name)
    },
    remove:(name)=>{
        return Cookie.remove(name);
    },
    saveLocale:(locale)=>{
        return Catch.set('locale',locale,3650)
    },
    getLocale:()=>{
        return Catch.get('locale')
    }
}


export default Catch;